﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using WebApplication1.App_Start;

namespace WebApplication1.Controllers.v2
{
    public class TestController : ApiController
    {
        [HttpGet]
        [Route("api/v2/Client/index")]
        public IHttpActionResult index()
        {
            var path = AppDomain.CurrentDomain.BaseDirectory + "test.csv";//指定文件路径
            return Json(new { name = "陶伟v2", age = "20", path = new Test().GetCSVpath(path)?$"写入成功,下载地址为：{path}":"写入失败,请检查"});
        }
    }
}
